package com.quartz.job;

import cn.hutool.core.date.DateUtil;
import org.quartz.Job;
import org.quartz.JobDetail;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * @author yzh
 * @version 1.0
 * @date 2021/8/2 11:10
 */
public class MyJob implements Job {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        JobDetail jobDetail = jobExecutionContext.getJobDetail();
        System.out.println(jobDetail.getKey());
        System.out.println(DateUtil.now());
    }
}
